home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / calctp.com / META2.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-11-04  |  2.3 KB  |  59 lines

  1. Unit Meta;
  2. Interface
  3.  
  4. Uses Fastwr;
  5.  
  6.   {FastWrite is a Public Domain text display Package By Brian Foley
  7.    available on Compuserve. GO BOR-100, the file is in LIB 2.  You may
  8.    modify the routines to use any other procedure you want.  FASTWR.TPU
  9.    has proven itself to be bug free and FAST! }
  10. Var
  11. MetaPos, LastLine : Integer;
  12.  
  13. {LastLines value MUST be assigned here in the Meta file.  It defines the lower
  14.  border of the window around the metaphor.  Therefore the maximum should be 25
  15.  and the minimum should be Row 7 for a minimal window around the inner frame.
  16.  
  17.  MetaPos is a global variable used by CALC.TPU to reposition the window when
  18.  moved on screen. }
  19.  
  20. Procedure DrawCalculator;
  21.  
  22. Implementation
  23.  
  24. Procedure DrawCalculator;
  25. Begin
  26.  
  27.   {Usage: procedure FastWrite(St : string; Row, Col, Attr : Byte);
  28.    The Row value of 1 is reserved for the the CALC.TPU generated window.
  29.    The width is also fixed in this release of CALC.TPU, but you may change
  30.    the value of LastLine to modify the window size, from the bottom up.
  31.    The calculator always remains anchored to the top of the screen. }
  32.  
  33.   FastWrite('┌────────────────────────┐',3,MetaPos,7);
  34.   FastWrite('│                        │',4,MetaPos,7);
  35.   FastWrite('└────────────────────────┘',5,MetaPos,7);
  36.   {Unless you want only the result in its own small window, use this
  37.   "inner window" to frame the numeric data, which allways appears on Row 4.}
  38.   FastWrite('┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌────┐',6,MetaPos,7);
  39.   FastWrite('│7│ │8│ │9│ │C│ │E│ │Esc.│',7,MetaPos,7);
  40.   FastWrite('└─┘ └─┘ └─┘ └─┘ └─┘ │ to │',8,MetaPos,7);
  41.   FastWrite('┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ├────┤',9,MetaPos,7);
  42.   FastWrite('│4│ │5│ │6│ │+│ │-│ │Quit│',10,MetaPos,7);
  43.   FastWrite('└─┘ └─┘ └─┘ └─┘ └─┘ │    │',11,MetaPos,7);
  44.   FastWrite('┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ├────┤',12,MetaPos,7);
  45.   FastWrite('│1│ │2│ │3│ │/│ │*│ │F10 │',13,MetaPos,7);
  46.   FastWrite('└─┘ └─┘ └─┘ └─┘ └─┘ │ to │',14,MetaPos,7);
  47.   FastWrite('┌─┐ ┌─┐ ┌─┐ ┌─────┐ ├────┤',15,MetaPos,7);
  48.   FastWrite('│0│ │∙│ │=│ │ - │ │Ins.│',16,MetaPos,7);
  49.   FastWrite('└─┘ └─┘ └─┘ └─────┘ └────┘',17,MetaPos,7);
  50. end;
  51. Begin
  52. (* Meta*)
  53. LastLine := 18;
  54.  
  55. { Lastline Must be set to define the position of the bottom of the window.
  56.   Note that it is one more that the last row in the FastWrite calls above. }
  57.  
  58. end.
  59.